package com.gelingqin.es.springbootdemo.controller;

import com.gelingqin.es.springbootdemo.service.ElasticsearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author gelingqin
 * @Create 2021-12-18-17:08
 */
@RestController
public class DataStreamController {

    @Autowired
    private ElasticsearchService elasticsearchService;


    /**
     * 查看所有数据流
     * @return
     */
    @RequestMapping("listAll")
    public Map listAll() {
        return elasticsearchService.performRequest("GET","/_data_stream",null,Map.class);
    }


}
